import request from '@/utils/request'

// 查询公寓管理列表
export function listApartments(query) {
  return request({
    url: '/apartments/apartments/list',
    method: 'get',
    params: query
  })
}

// 查询公寓管理详细
export function getApartments(apartmentId) {
  return request({
    url: '/apartments/apartments/' + apartmentId,
    method: 'get'
  })
}

// 新增公寓管理
export function addApartments(data) {
  return request({
    url: '/apartments/apartments',
    method: 'post',
    data: data
  })
}

// 修改公寓管理
export function updateApartments(data) {
  return request({
    url: '/apartments/apartments',
    method: 'put',
    data: data
  })
}

// 删除公寓管理
export function delApartments(apartmentId) {
  return request({
    url: '/apartments/apartments/' + apartmentId,
    method: 'delete'
  })
}
